package com.ssy.lingxi.search.api.hystrix;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.search.api.feign.IPurchaseFeign;
import com.ssy.lingxi.search.api.model.request.SimpleIdListRequest;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * 进货单服务-熔断服务实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/24
 */
@Component
@Qualifier("purchaseHystrix")
public class PurchaseHystrix implements IPurchaseFeign {
    @Override
    public Wrapper<String> deletePurchase(SimpleIdListRequest simpleIdListRequest) {
        throw new BusinessException(ResponseCode.SERVICE_SEARCH_ERROR);
    }

    @Override
    public Wrapper<String> deletePurchaseChannel(SimpleIdListRequest simpleIdListRequest) {
        throw new BusinessException(ResponseCode.SERVICE_SEARCH_ERROR);
    }

    @Override
    public Wrapper<Double> getPurchaseCommodityCount(Long shopId, Long memberId, Long memberRoleId, Long commoditySkuId) {
        throw new BusinessException(ResponseCode.SERVICE_SEARCH_ERROR);
    }
}
